using System;
using System.Collections.Generic;
using System.Text;

namespace DailyTestConsole
{
    public class CountChar
    {
        static UInt16[,] ASCMapping = new UInt16[128,2];

        private static void initMapping()
        {
            for (UInt16 i = 0; i < 128; i++)
            {
                ASCMapping[i, 0] = i;
            }
        }

        private static void PrintResult()
        {
            for (UInt16 i = 0; i < 128; i++)
            {
                if (ASCMapping[i, 1] > 0)
                    Console.WriteLine(string.Format("{0},{1}",(char)ASCMapping[i, 0], ASCMapping[i, 1]));
            }
        }

        public static void test()
        {
            initMapping();
            string s = "12345ACDEasde";
            for (int i = 0; i < s.Length; i++)
            {
                ASCMapping[(UInt16)s[i],1]++;
            }
            PrintResult();
        }
    }
}
